﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Reflection;

public class Person
{
    public Person() {}
}

namespace 第四次作业
{
    internal class d3
    {
        static void Main()
        {
            Type personType = typeof(Person);
            ConstructorInfo ctor = personType.GetConstructor(Type.EmptyTypes); 
            if (ctor != null)
            {
                object personInstance = ctor.Invoke(new object[0]);
                Console.WriteLine("实例创建成功: " + personInstance.GetType().Name);
            }
            else
            {
                Console.WriteLine("未找到无参构造方法。");
            }
        }
    }
}
